﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Himall.Entity.Config
{
   public class OrderRefundInfoConfig : EntityTypeConfiguration<OrderRefundInfo>
    {
        public OrderRefundInfoConfig()
        {
            ToTable("Himall_OrderRefunds");
            Property(item => item.ShopName).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.Applicant).HasColumnType("varchar").HasMaxLength(1000);
            Property(item => item.Reason).HasColumnType("varchar").HasMaxLength(1000);
            Property(item => item.ContactPerson).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.ContactCellPhone).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.RefundAccount).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.SellerRemark).HasColumnType("varchar").HasMaxLength(1000);
            Property(item => item.ManagerRemark).HasColumnType("varchar").HasMaxLength(1000);
            Property(item => item.ExpressCompanyName).HasColumnType("varchar").HasMaxLength(200);
            Property(item => item.ShipOrderNumber).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.Payee).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.PayeeAccount).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.RefundBatchNo).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.CertPic1).HasColumnType("varchar").HasMaxLength(1000);
            Property(item => item.CertPic2).HasColumnType("varchar").HasMaxLength(1000);
            Property(item => item.CertPic3).HasColumnType("varchar").HasMaxLength(1000);
            Property(item => item.ReasonDetail).HasColumnType("varchar").HasMaxLength(1000);
          
            HasRequired(x => x.OrderItemInfo).WithMany(x => x.OrderRefundInfo).HasForeignKey(x => x.OrderItemId);
        }
    }
}
